import javax.swing.*;
import java.awt.*;
import java.util.Vector;
public class TestComboboxDemo01 extends JFrame {
    public TestComboboxDemo01(){

        Container container = this.getContentPane();
        String text1="";

        for (int i = 0; i < 10; i++) {
            text1 +="文本"+i+"\n";
        }

        JTextField textField = new JTextField(text1,20);
        JTextField textField02 = new JTextField("textField2",20);

        container.add(textField,BorderLayout.NORTH);
        container.add(textField02,BorderLayout.SOUTH);

        this.setVisible(true);
        this.setSize(300,400);
        this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    }

    public static void main(String[] args) {
        new TestComboboxDemo01();
    }
}